export default {
  data() {
    return {
      isOriginHei: true,
      originHeight: 0,
      originWidth: 0,
      isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)
    }
  },
  created() {
    this.originHeight = document.documentElement.clientHeight || document.body.clientHeight || window.innerHeight;
    this.originWidth = document.documentElement.clientWidth || document.body.clientWidth || window.innerWidth;

    window.addEventListener('orientationchange' in window ? 'orientationchange' : 'resize', () => {
      let clientH = document.documentElement.clientHeight || document.body.clientHeight || window.innerHeight;
      /*this.isOriginHei = this.isMobile && window.orientation === 90 || window.orientation === -90
        ? !(clientH < this.originWidth)
        : !(clientH < this.originHeight);*/
      this.isOriginHei = !(clientH < this.originHeight);
    })
  },
}
